<?php
class Article extends CustomerController {
    public function __construct() {
        parent::__construct();
    }
    
    public function index() {
        $this->_data["loadPage"]="article/index_view";
        $this->_data["loadMenu"]="other/menu_view";
        $this->_data["titlePage"]="article";
        
        $this->load->model("mmodule");
        $tmp=$this->mmodule->listAll();
        if($tmp!=false)
            $this->_data["info_module"]=$tmp;
        
        //---------------------
        $module_id=$this->uri->segment(4);
        $this->load->model("mcategory");
        $this->load->model("marticle");
        $cate_id=$this->mcategory->getByCateParentAndModuleId($module_id)["cate_id"];
        $article=$this->marticle->getByCateIdAndStatusId($cate_id);
        if($article!=FALSE)
            $this->_data["info"]=$article;
        
        $this->load->view($this->_data["path"], $this->_data);
    }
}
?>
